package ClientD;

import java.math.BigDecimal;

abstract class Fruit implements FruitFactory {
    protected String name;
    protected String prices;
    protected String num;

    public Fruit(String name, String prices, String num) {
        this.name = name;
        this.prices = prices;
        this.num = num;
    }

    @Override
    public abstract BigDecimal payCount();

    @Override
    public String showInfo() {
        return name + " 单价: " + prices + "元/公斤, 数量: " + num + "公斤";
    }
}